//引入request文件的封装api
import API from "./request/request"
// 封装导航栏api
wx.catitems=API.catitemsApi
// 封装首页楼层api
wx.Floordata=API.getFloordataApi
//封装分类api接口
wx.categories = API.categoriesApi
// 商品列表搜索封装api 
wx.shopSearchApi = API.shopSearchApi
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: null
  }
})
